#include <stdio.h>

int main(int argc, char *argv[]) {
    int a,b,c=0;
    scanf("%d", &a);
    
    if (a>0)
    {
        for (; 0 < a; )
        {
            b = a % 10;
            a = (a - b) / 10;
            c++;
        }
    }
    
    printf("%d", c);

    return 0;
}